<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改购物车商品数量</title>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="../js/jquery-3.1.0.min.js"></script>
<script type="text/javascript">
function bu(){
	var num=$(":text:first").val();
	if(num==""){
		alert("请输入商品数量");
	}else if(num<=0){
		alert("商品数量不能小于1");
	}else if(num>=100){
		alert("商品数量不能大于99");
	}
	else{
		location.href="UpdateShoppingcartServlet?id="+${param.id }+"&num="+num;
	}
}
</script>
</head>
<body>
商品数量:<input type="text" name="num" value="${param.num }">
<input type="hidden" value="${param.id }" >
<input type="button" value="修改"  onclick="bu();">
</body>
</html>